<!DOCTYPE html>
<html lang="en">
<head>
<meta name="layout" content="main_pc">
<title>火堆工作台</title>
<link rel="stylesheet"
	href="${resource(dir: 'css', file: 'user.center.css')}" type="text/css">
<script type="text/javascript"
	src="${resource(dir: 'js', file: 'jquery-1.10.2.js')}"></script>
<script type="text/javascript"
	src="${resource(dir: 'js', file: 'ajaxfileupload.js')}"></script>
<script
	src="${resource(dir: 'js', file: 'bootstrap-datepicker.min.js')}"
	charset="UTF-8"></script>
<link rel="stylesheet"
	href="${resource(dir: 'css_pc', file: 'bootstrap-datepicker.css')}"
	type="text/css">
<style>
.fix-width {
	width: 210px;
	height: 40px;
	float: left;
	margin-left: 20px;
}

.btn-container-div {
	width: 580px;
	height: 40px;
	margin-left: 20px;
	display: block;
}

.btn-container {
	float: left;
	width: 80px;
	height: 48px;
}

.data-list-box {
	margin-top: 100px;
}

.link-download-all {
	padding: 6px 12px;
	margin-bottom: 0;
	font-size: 14px;
	font-weight: normal;
	line-height: 1.428571429;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 4px;
	-webkit-user-select: none;
}
</style>
</head>
<body>

	<div class="container-fluid">

		<section class="quick-navi mb20">
			<div class="container">
				<a href="#" class="quick-link"><span>火堆工作台</span><span
					class="caret"></span></a>
				<!--a href="#" class="quick-link">联系我们</a-->
			</div>
		</section>

		<section>
			<div class="container mb50">

				<g:render template="navigate" model="[status: status]" />

				<div class="right-content" id="rightconsole">
					<div
						style="line-height: 25px; font-size: 15pt; padding: 10px 0px 10px 0px">
						捐赠明细</div>

					<g:form id="all-form"
						url="[action:'donateDetail',controller:'manage']" method="post">

						<div class="form-item fix-width">
							<label for="">捐赠ID:<span class="tips"></span></label>
							<div class="form-ctrl">
								<input type="text" class="donateID" id="donateID"
									name="donateID" value="${donateID}" >
							</div>
						</div>

						<div class="form-item fix-width">
							<label for="">用户ID:<span class="tips"></span></label>
							<div class="form-ctrl">
								<input type="text" class="userID" id="userID" name="userID"
									value="${userID}">
							</div>
						</div>

						<div class="form-item fix-width">
							<label for="">昵称:<span class="tips"></span></label>
							<div class="form-ctrl">
								<input type="text" class="nickname" id="nickname"
									name="nickname" value="${nickname}">
							</div>
						</div>

						<div class="form-item fix-width">
							<label for="">项目名称:<span class="tips"></span></label>
							<div class="form-ctrl">
								<input type="text" class="projectName" id="projectName"
									name="projectName" value="${projectName}">
							</div>
						</div>
						
						<div class="form-item fix-width">
							<label for="">起始时间:<span class="tips"></span></label>
							<div class="form-ctrl">
								<input type="text" class="datepicker" id="datePicker1"
									name="beginDate" value="${beginDate}">
							</div>
						</div>
						<div class="form-item fix-width">
							<label for="">截止时间:<span class="tips"></span></label>
							<div class="form-ctrl">
								<input type="text" class="datepicker" id="datePicker2"
									name="endDate" value="${endDate}">
							</div>
						</div>

						<div class="form-item fix-width">
							<label for="">支付渠道:<span class="tips"></span></label>
							<div class="form-ctrl">
								<select id="types" name="types"
									style="width: 145px; height: 40px; border: 1px solid;">
									<option value=""></option>
									<option value="微信支付">微信支付</option>
									<option value="支付宝支付">支付宝支付</option>
								</select>
							</div>
						</div>


						<div class="form-item fix-width">
							<label for="">项目状态:<span class="tips"></span></label>
							<div class="form-ctrl">
								<select id="verified" name="verified"
									style="width: 145px; height: 40px; border: 1px solid;">
									<option value=""></option>
									<option value="draft">草稿</option>
									<option value="wait">审核中</option>
									<option value="refuse">不通过</option>
									<option value="modify">退回修改</option>
									<option value="pass">筹款中</option>
									<option value="execute">筹满</option>
									<option value="doing">执行中</option>
									<option value="expired">已过期</option>
									<option value="over">已结束</option>
								</select>
							</div>
						</div>

						<div class="btn-container-div">
							<div class="btn-container">
								<Button class="btn btn-save-all">搜索</Button>
							</div>



						</div>


					</g:form>

					<div class="btn-container">
						<g:link controller="manage" action="downDonateDetailReport"
							params='[beginDate:"${beginDate}",endDate:"${endDate}",
									userID:"${userID }",donateID:"${donateID }",types:"${types }",verified:"${verified }",
									nickname:"${nickname }",projectName:"${projectName }",exportType:"excel",extension:"xls"]'
							target='_blank'>
							<Button class="btn btn-download-all" data-dialog="dialog1">
								导出为excel表</Button>
						</g:link>
					</div>

					<div class="data-list-box">
						<ul class="cdsp-table">
							<li class="t-head">
								<div class="col-1">捐ID</div>
								<div class="col-1">用ID</div>
								<div class="col-2">昵称</div>
								<div class="col-2">项目名称</div>
								<div class="col-1">状态</div>
								<div class="col-2">捐赠总额</div>
								<div class="col-2">配捐金额</div>
								<div class="col-2">捐赠时间</div>
								<div class="col-1">渠道</div>
								<div class="col-2">一起捐发起人</div>
								<div class="col-2">配捐爱心池</div>
								<div class="col-2">配捐金额</div>
								<div class="clearboth"></div>
							</li>

							<g:each in="${fRulesjson}" var="${json}" status="i">
								<li>
									<div class="col-1">
										<div class="title">
											${json.id}
										</div>
									</div>
									<div class="col-1">
										<div class="title">
											${json.memberid}
										</div>
									</div>
									<div class="col-2">
										<div class="title">
											${json.nickname}
										</div>
									</div>
									<div class="col-2">
										<div class="text">
											${json.projectName}
										</div>
									</div>
									<div class="col-1">
										<g:if test="${json.verified == 'execute'}">
											<div class="text">执行中</div>
										</g:if>
										<g:elseif test="${json.verified == 'draft'}">
											<div class="text">草稿</div>
										</g:elseif>
										<g:elseif test="${json.verified == 'wait'}">
											<div class="text">审核中</div>
										</g:elseif>
										<g:elseif test="${json.verified == 'refuse'}">
											<div class="text">不通过</div>
										</g:elseif>
										<g:elseif test="${json.verified == 'modify'}">
											<div class="text">退回修改</div>
										</g:elseif>
										<g:elseif test="${json.verified == 'pass'}">
											<div class="text">筹款中</div>
										</g:elseif>
										<g:elseif test="${json.verified == 'expired'}">
											<div class="text">已过期</div>
										</g:elseif>
										<g:elseif test="${json.verified == 'over'}">
											<div class="text">已结束</div>
										</g:elseif>
									</div>
									<div class="col-2">
										<div class="text">
											<g:formatNumber number="${json.money}"  maxFractionDigits="2" />元
										</div>
									</div>
									<div class="col-2">
										<div class="text">
											<g:formatNumber number="${json.fdonate_fee}"  maxFractionDigits="2" />元
										</div>
									</div>
									<div class="col-2">
										<div class="text">
											${json.date}
										</div>
									</div>
									<div class="col-1">
										<div class="text">
											${json.type}
										</div>
									</div>
									<div class="col-2">
										<div class="text">
										
											${json.subnickname}
										
										</div>
									</div>
									<div class="col-2">
										<div class="text">
										
											${json.fundpoolname}
										
										</div>
									</div>
									<div class="col-2">
										<div class="text">
										
											<g:formatNumber number="${json.fdonate_fee/100}"  maxFractionDigits="2" />元
										
										</div>
									</div>
									<div class="clearboth"></div>
								</li>
							</g:each>
						</ul>
					</div>

					<div class="pagea">
						<span>共${totalCount ?: 0}条记录
						</span>
						<div class="page float_r">
							<g:paginate controller="manage" action="donateDetail"
								total="${totalCount ?: 0}" params="${params}" />
						</div>
					</div>
				</div>




			</div>
			<div class="clearboth"></div>
		</section>


	</div>

	<!-- 删除弹出框 -->


	<script type="text/javascript">
		$(function() {
			$(
					'.meterial-lib-box .content-box .form-box .img-box input[type=file]')
					.change(
							function() {
								$(this)
										.siblings('.img-default')
										.hide()
										.parent()
										.css('background-image',
												'url(' + getFileURL(this) + ')');
							});
		});
	</script>

	<script type="text/javascript">
		$(function() {
			$(
					'.meterial-lib-box .content-box .form-box .img-box input[type=file]')
					.change(
							function() {
								$(this)
										.siblings('.img-default')
										.hide()
										.parent()
										.css('background-image',
												'url(' + getFileURL(this) + ')');
							});
			$('.date-picker').datepicker({
				language : 'zh-CN',
				autoclose : true,
				todayHighlight : true
			})

			$('#datePicker1').datepicker({
				format : "yyyy-mm-dd"
			});
			$('#datePicker2').datepicker({
				format : "yyyy-mm-dd"
			});

			$('.btn-save-all').click(function() {
				this.html('search...');
				this.click(function() {
				});
				var data = editor.getValue();
				$("#articleDetail").val(data);
				//console.log(data);
				$("#all-form").submit();

			});

		});
	</script>



	</script>


</body>
</html>